package com.ruicar.afs.cloud.channel.grade.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@Accessors(chain = true)
@TableName("grade_model_result")
@EqualsAndHashCode(callSuper = true)
public class GradeModelResult extends Model<GradeModelResult> {
    @ApiModelProperty(value = "物理主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty(value = "机构编号")
    private Long brcode;
    @ApiModelProperty(value = "登录员工编号")
    private Long tlrno;
    @ApiModelProperty(value = "模型类型")
    private String modelType;
    @ApiModelProperty(value = "模型编码")
    private String modelCode;
    @ApiModelProperty(value = "客户号")
    private String custcd;
    @ApiModelProperty(value = "模型得分-总分")
    private BigDecimal modelSocre;
    @ApiModelProperty(value = "本次评级")
    private String modelValue;
    @ApiModelProperty(value = "手工调整得分")
    private BigDecimal modelChgSocre;
    @ApiModelProperty(value = "手工调整评级")
    private String modelChgValue;
    @ApiModelProperty(value = "评分日期")
    private Date gradeDate;
    @ApiModelProperty(value = "期数")
    private String term;
    @ApiModelProperty(value = "期数类型")
    private String termType;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "时间戳")
    private Date timestamps;
    @ApiModelProperty(value = "最后一次更新操作人编号")
    private Long lastUpdTlr;
    @ApiModelProperty(value = "上次操作XX")
    private String lastUpdFunc;
    @ApiModelProperty(value = "最后一次更新日期")
    private Date lastUpdDate;
    @ApiModelProperty(value = "审核人员")
    private String checker;
    @ApiModelProperty(value = "审核日期")
    private Date checkDate;
    @ApiModelProperty(value = "有效标记")
    private String validFlag;
    @ApiModelProperty(value = "有效日期")
    private Date validDate;
    @ApiModelProperty(value = "申请编号")
    private String appno;
    @ApiModelProperty(value = "申请状态")
    private String appstat;
    @ApiModelProperty(value = "评级有效期")
    private Date gradeValidDate;

    //新增字段
    @ApiModelProperty(value = "客户经理")
    private String customerManager;
    @ApiModelProperty(value = "业务类型，新车二手车")
    private String businessType;
    @ApiModelProperty(value = "合作商编号")
    private String channelCode;
    @ApiModelProperty(value = "渠道全称")
    private String channelFullName;
    @ApiModelProperty(value = "渠道归属,只区分直营、非直营")
    private String channelBelong;
    @ApiModelProperty(value = "详细渠道归属，区分直营、sp、总对总，动态查询用")
    private String channelBelongDtl;
    @ApiModelProperty(value = "上一次评级")
    private String lastModelValue;
    @ApiModelProperty(value = "评估日期（8位字符）")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String gradeDateStr8;
    @ApiModelProperty(value = "评估类型：0-大数据评估，1-试算评估")
    private String gradeType;
    @ApiModelProperty(value = "删除标记（0-未删，1-已删）")
    private String delFlag;
}
